<?php

/*---------------------------------------------------------------------------
 * Please, don't touch this file.
 *
 * If you need to custom this Class, you can edit recipient.php
 * file overwrite and define new methods
 *---------------------------------------------------------------------------
 */

/**
 * 
 *
 * @Authors Gonzalez Federico, Viera Leonel 
 * @package mailing
 * @subpackage model
 *
 * 
 */
class Recipient_protoweb extends Protoweb_models {
  public $table      = "recipients";
  public $model      = "recipient";
  public $has_many   = array('subscriber', 'send', 'attrvalue');
  public $has_one    = array('client');
  public $validation = array(
    'email' => array(
      'label' => 'Email',
      'rules' => array('trim', 'required', 'valid_email', 'unique_pair' => 'client_id')
    ),
    'firstname' => array(
      'label' => 'Firstname',
      'rules' => array('trim')
          
    ),
    'lastname' => array(
      'label' => 'Lastname',
      'rules' => array('trim')
          
    ),
    'nickname' => array(
      'label' => 'Nickname',
      'rules' => array('trim')
          
    ),
    'created' => array(
      'label' => 'Created',
      'rules' => array('valid_date')
          
    ),
    'verified' => array(
      'label' => 'verified',
      'rules' => array('required')
          
    ),
    'offdate' => array(
      'label' => 'Off Date',
      'rules' => array('valid_date')
          
    ),
    'offreason' => array(
      'label' => 'Off Reason',
      'rules' => array('trim')
          
    ),
    'sends' => array(
      'label' => 'Sencs counter',
      'rules' => array()
          
    ),
    'bounces' => array(
      'label' => 'Bounceds counter',
      'rules' => array()
    )
  ); // $validation
  

  public function __construct($id = NULL) {
    parent::__construct($id);
  } // end of method __construct($id = NULL)

} // Class Recipient_protoweb

/* End of file Recipient_protoweb.php */
/* Location: ./system/application/models/Recipient_protoweb.php */